package com.zs.toolbox.web2j.system.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.zs.toolbox.web2j.common.domain.WtBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户-消息表
 * </p>
 *
 * @author eric.zhang
 * @since 2018-10-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_user_message")
@ApiModel(value = "WtUserMessageEntity对象", description = "用户-消息表")
@JsonIgnoreProperties(ignoreUnknown = true)
public class WtUserMessageEntity extends WtBaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "是否已读")
    @TableField("readed")
    private Boolean readed = false;

    @ApiModelProperty(value = "消息类型")
    @TableField("message_type")
    private String messageType;

    @ApiModelProperty(value = "消息标题")
    @TableField("message_title")
    private String messageTitle;

    @ApiModelProperty(value = "消息内容")
    @TableField("message_content")
    private String messageContent;

    @ApiModelProperty(value = "创建人")
@TableField(value = "create_user", fill = FieldFill.INSERT)
    private Integer createUser;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否有效 1有效    2无效")
    @TableField("delete_status")
    @TableLogic
    private Integer deleteStatus;


}
